-
Notifications
You must be signed in to change notification settings - Fork 80
Fix OTA properties synchronization #289
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov Report
@@ Coverage Diff @@
## master #289 +/- ##
=======================================
Coverage 95.31% 95.31%
=======================================
Files 25 25
Lines 896 896
=======================================
Hits 854 854
Misses 42 42 Continue to review full report at Codecov.
|
Memory usage change @ e51f540
Click for full report table
Click for full report CSV
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍 Minor nitpicks - use the feedback at your own caution - overall looks good 👍
e51f540
to
052b30e
Compare
Switching to ArduinoIoTCloud 1.3.0 from earlier version can lead to an OTA loop caused by bad synchronization of OTA_REQ property. The OTA loop occurs when the resulting CBOR message created calling sendPropertiesToCloud() is greater than 256 byte and thus it gets splitted in multiple parts. If the OTA variables are not synched within the firs part of the message the OTA process restart before the remainig properties are synched.
With this PR the OTA properties are synched all together within the same CBOR message ensuring a correct synchronization.
Updating an application builded with an ArduinoIoTCloud library < 1.3.0 with an OTA will still lead to an OTA process executed two times.
Thanks @eclipse1985 for spotting this.
/cc @zmoog